﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CanDoo.Data.Entity;
using CanDoo.Oil.Core.Models;

namespace CanDoo.Oil.Core.ModelConfigurations
{
    /// <summary>
    /// 实体类-数据表映射——管路清洗日志
    /// </summary>
    public class CleanRecordConfiguration : EntityConfigurationBase<CleanRecord>
    {
        /// <summary>
        /// 初始化一个<see cref="CleanRecordConfiguration"/>类型的新实例
        /// </summary>
        public CleanRecordConfiguration()
        {
             ToTable("log_CleanRecord");
             this.Property(p => p.OilSalesSerialNumId).HasColumnName("OilSalesSerialNumId");
             this.HasRequired(p => p.OilSalesSerialNum).WithMany().HasForeignKey(p => p.OilSalesSerialNumId).WillCascadeOnDelete(false);

        }
    }
}
